package code.c08;

import java.util.Objects;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/20 10:16
 * @package code.c08
 * @description 文件说明
 */

public class Student {

    private int s_no;
    private String s_name;

    public Student(int s_no, String s_name) {
        this.s_no = s_no;
        this.s_name = s_name;
    }

    public int getS_no() {
        return s_no;
    }

    public void setS_no(int s_no) {
        this.s_no = s_no;
    }

    public String getS_name() {
        return s_name;
    }

    public void setS_name(String s_name) {
        this.s_name = s_name;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return s_no == student.s_no &&
                Objects.equals(s_name, student.s_name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(s_no, s_name);
    }

    @Override
    public String toString() {
        return "Student{" +
                "s_no=" + s_no +
                ", s_name='" + s_name + '\'' +
                '}';
    }
}
